// 通过循环遍历menuConfig 生成路由规则和导航菜单
export const menuConfig = [
  {
    id: '1',
    name: 'Dashboard',
    icon: null,
    children: [
      {
        name: '分析页',
        path: 'fxy',
        roles: ['admin'],
        icon: null,
        meta: {},
        menuProps: { hidden: false },

        component: () => import('@/views/analysis/index.vue'),
      },
      {
        name: '工作台',
        path: 'gzt',
        roles: ['root', 'admin'],
        icon: null,
        menuProps: { hidden: false },

        meta: {},
        component: () => import('@/views/workbench/Table.vue'),
      },
    ],
  },
  {
    id: '2',
    name: 'Listpage',
    children: [
      {
        name: 'Listpage',
        icon: null,
        meta: {}, //自定义信息
        path: 'list',
        roles: ['admin'],
        menuProps: { hidden: false },

        component: () => import('@/views/listpage/list.vue'),
      },
    ],
  },
  {
    id: '3',
    name: '叩钉',
    children: [
      {
        name: '首页',
        icon: null,
        meta: {},
        path: 'coding/home',
        roles: ['admin'],
        menuProps: { hidden: false },

        component: () => import('@/views/coding/coding.vue'),
      },
      {
        meta: {},
        path: 'coding/home/detail/:id',
        roles: ['admin'],
        // 名字随便起的  hidden 变成true 导航菜单不显示
        // 路由规则没事
        menuProps: { hidden: true },
        component: () => import('@/views/coding/Detail.vue'),
      },
    ],
  },
];
